public class jia {
        public int[] twoSum(int[] nums, int target) {
            for(int i=0;i<nums.length;i++){
                for(int j=0;j<nums.length;j++){
                    if(nums[i]+nums[j]==target){
                        return new int[]{i,j};
                    }
                }
            }
            return new int[]{};

        }
        public static void main(String[]args){
            jia twoSum=new jia();
            int[] nums{2,7,11,15};
            int target=9;
            int[]result=jia.twoSum(nums,target);
            for(int num:result){
                System.out.print(num+" ");
            }
        }
}
